package HomeWork.filePracrice;

import java.io.File;

public class a06 {
    public static void main(String[] args) {
        File f=new File("./");
        File[] sub=f.listFiles(pathname -> pathname.getName().contains("s"));  //用indexOf不等于-1也能表示存在
        for(File file:sub){
            System.out.println(file.getName());
        }

    }
}
